
package com.oazon.moco.playlist.bean;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>Java class for mediaList complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="mediaList">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="index" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         &lt;element name="count" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         &lt;element name="total" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         &lt;choice maxOccurs="unbounded" minOccurs="0">
 *           &lt;element name="mediaCollection" type="{http://www.sonos.com/Services/1.1}mediaCollection"/>
 *           &lt;element name="mediaMetadata" type="{http://www.sonos.com/Services/1.1}mediaMetadata"/>
 *         &lt;/choice>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
public class MediaList <T extends AbstractMedia>{

    protected int index;
    protected int count;
    protected int total;
    protected List<T> mediaCollectionOrMediaMetadata;

    /**
     * Gets the value of the index property.
     * 
     */
    public int getIndex() {
        return index;
    }

    /**
     * Sets the value of the index property.
     * 
     */
    public void setIndex(int value) {
        this.index = value;
    }

    /**
     * Gets the value of the count property.
     * 
     */
    public int getCount() {
        return count;
    }

    /**
     * Sets the value of the count property.
     * 
     */
    public void setCount(int value) {
        this.count = value;
    }

    /**
     * Gets the value of the total property.
     * 
     */
    public int getTotal() {
        return total;
    }

    /**
     * Sets the value of the total property.
     * 
     */
    public void setTotal(int value) {
        this.total = value;
    }

    /**
     * Gets the value of the mediaCollectionOrMediaMetadata property.
     * 
     * <p>
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the mediaCollectionOrMediaMetadata property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getMediaCollectionOrMediaMetadata().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link MediaCollection }
     * {@link MediaMetadata }
     * 
     * 
     */
    
    public void setMediaCollectionOrMediaMetadata(List<T> data) {
    	mediaCollectionOrMediaMetadata = data;
    }
    
    public List<T> getMediaCollectionOrMediaMetadata() {
        if (mediaCollectionOrMediaMetadata == null) {
            mediaCollectionOrMediaMetadata = new ArrayList<T>();
        }
        return this.mediaCollectionOrMediaMetadata;
    }

}
